﻿#ifndef CScreenProtectorDlg_H
#define CScreenProtectorDlg_H

#include <QDialog>
#include <QTimer>
#include <QString>
#include "common.h"
#include "cruntimesetting.h"
#include <QKeyEvent>

namespace Ui {
class CScreenProtectorDlg;
}

class CScreenProtectorDlg : public QDialog
{
    Q_OBJECT

public:
    explicit CScreenProtectorDlg(QWidget *parent = nullptr);
    ~CScreenProtectorDlg();
    virtual const ss::RunConfig& GetRuntimeSettings();

private:
    Ui::CScreenProtectorDlg *ui;
    QTimer* m_timer;

public:
    void Draw();
    void Initialize();

public slots:
    void OnTimerOut();

protected:
    void paintEvent(QPaintEvent *event);
    virtual void keyPressEvent(QKeyEvent *e) override;

};

#endif // CScreenProtectorDlg_H
